<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <h2>{{message}}</h2>
    <!-- 1.单个复选框，绑定到布尔值：-->
    <input type="checkbox" id="checkbox" v-model="checked">
    <label for="checkbox">{{ checked }}</label>
    <br>
    <button type="button" :disabled="!checked">下一步</button>

    <!-- 2.多个复选框，绑定到同一个数组：-->
    <br>
    <!-- label使用一-->
    <input type="checkbox" id="jack" value="Jack" v-model="checkedNames">
    <label for="jack">Jack</label>
    <input type="checkbox" id="john" value="John" v-model="checkedNames">
    <label for="john">John</label>
    <input type="checkbox" id="mike" value="Mike" v-model="checkedNames">
    <label for="mike">Mike</label>
    <!--  label使用二-->
    <label>
        <input type="checkbox" id="lu" value="lu" v-model="checkedNames">lu
    </label>
    <input type="checkbox" id="kai" value="Kai" v-model="checkedNames">Kai
    <br>
    <span>Checked names: {{ checkedNames }}</span>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    const app = new Vue({
        el: '#app',
        data: {
            message: 'simplelu',
            checked: true,
            checkedNames: ['John']
        }
    })
</script>
</body>
</html>